<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>14v-show</title>
<style>
  .box{
    width: 300px;
    height: 300px;
    background-color: tomato;
  }
  .box2{
    width: 300px;
    height: 300px;
    background-color: orange;
  }
</style>
</head>
<body>

  <div id='app'>
    <button @click="change">按钮</button>
    <div class="box" v-if="isShow">div1</div> 
    <div class="box2" v-show="isShow">div2</div> 
  </div>

<script src='https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.js'></script>
<script>
  const app = new Vue({
    el: '#app'
    ,data:{
      msg: 'Hello Vue'
      ,isShow: false
    }
    ,methods: {
      change(){
        this.isShow = !this.isShow;
      }
    }
  })
</script>
</body>
</html>